"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
var Window = /** @class */ (function () {
    function Window() {
    }
    ;
    //通过单例来实现new实例的静态私有方法
    Window.getInstance = function () {
        if (!Window.instance) {
            console.log('1  没有走缓存！');
            return Window.instance = new Window();
        }
        ;
        console.log('1  走缓存！');
        return Window.instance;
    };
    return Window;
}());
//1 测试单例
var w1 = Window.getInstance();
var w2 = Window.getInstance();
console.log("1 \u4E24\u4E2A\u5B9E\u4F8B\u662F\u5426\u4E00\u6837" + (w1 == w2));
